﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Text;
using System.Threading.Tasks;

namespace DalFactory
{
    public class dbSessionFactory
    {
        public static IdbSession getDbSession() {
            IdbSession mydbSession = (IdbSession)CallContext.GetData("mydbSession");
            if (mydbSession == null)
            {
                mydbSession = new dbSession();
                CallContext.SetData("mydbSession", mydbSession);
            }
            return mydbSession;
        }
    }
}
